Ext.define('jwawa.erp.home.portal.PortalShell', {
    extend: 'jwawa.erp.framework.ShellContainer',
    handlerClass:'jwawa.erp.home.portal.PortalHandler',
    uses: ['jwawa.erp.home.portal.PortalPanel', 'jwawa.erp.home.portal.PortalColumn',
        'jwawa.erp.home.portal.GridPortlet', 'jwawa.erp.home.portal.ChartPortlet'],
    border: false,
    items: [
        {
            id: 'app-portal',
            xtype: 'portalpanel',
            region: 'center',
            border: false,
            items:[
                {
                    id: 'col-1',
                    items: [
                        {
                            id: 'portlet-2',
                            title: '待处理事项',
                            html: '<div class="portlet-content">' +
                                    '发票报销 (<a href="#">2</a>/<a href="#">20</a>)<br/>' +
                                    '加班申请 (<a href="#">2</a>/<a href="#">20</a>)<br/>' +
                                '</div>'
                        },
                        {
                            id: 'portlet-1',
                            title: 'Grid Portlet',
                            items: Ext.create('jwawa.erp.home.portal.GridPortlet'),
                            tools:{
                                xtype: 'tool',
                                type: 'gear',
                                handler: function(e, target, panelHeader, tool){
                                    var portlet = panelHeader.ownerCt;
                                    portlet.setLoading('Working...');
                                    Ext.defer(function() {
                                        portlet.setLoading(false);
                                    }, 2000);
                                }
                            }
                        }
                    ]
                },
                {
                    id: 'col-2',
                    items: [
                        {
                            id: 'portlet-3',
                            title: 'Portlet 3',
                            html: '<div class="portlet-content">sssss</div>'
                        }
                    ]
                },
                {
                    id: 'col-3',
                    items: [
                        {
                            id: 'portlet-4',
                            title: 'Stock Portlet',
                            items: Ext.create('jwawa.erp.home.portal.ChartPortlet')
                        }
                    ]
                }
            ]
        }
    ]
});